<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>表单域修饰符</title>
</head>
<body>
    <div id="app">
        <input type="text" v-model.number='text'>
        <p>变为数字</p>
        <input type="text" v-model.trim='msg'>
        <p>格式化两边的空字符串</p>
        <input type="text" v-model.lazy='lazy'>
        <div>失去焦点时出现：{{lazy}}</div>
        <button @click='handle'>点击</button>
    </div>
</body>
<script src="js/vue.js"></script>
<script>
    var vm = new Vue({
        el:'#app',
        data:{
            text:'',
            msg:'',
            lazy:''
        },
        methods: {
            handle:function(){
                console.log(typeof(this.text))
                console.log(this.msg.length)
            }
        },
    })
</script>
</html>